import React from 'react';
import { Checkbox, message } from 'antd';
export default (props) => {
    const { type, title, datas, fieldNames, currentValue, clickConfirm } = props;
    return <div className="offwards">
        <div className="restrict">{title}：</div>
        <div className="reduceWeight">
            {datas.map((item, index) => (
                <div
                    key={item[fieldNames.value]}
                    className={`comfort ${currentValue === item[fieldNames.value] && 'comfortBlue'}`}
                    onClick={() => {
                        clickConfirm(item[fieldNames.value]);
                    }}
                >
                    {item[fieldNames.label]}
                </div>
            ))}
        </div>
    </div>

}